<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>用户管理 - Kexio 管理系统</title>
  <!-- 引入Element Plus CSS -->
  <link rel="stylesheet" href="https://unpkg.com/element-plus@2.4.4/dist/index.css">
  <!-- 引入Font Awesome图标 -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  <!-- 引入Tailwind CSS -->
  <script src="https://cdn.tailwindcss.com"></script>
  
  <!-- 配置Tailwind CSS自定义颜色和字体 -->
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: {
            primary: '#000000',
            'primary-hover': '#333333',
            'primary-active': '#222222',
            'primary-weak': 'rgba(0, 0, 0, .05)',
            'text-primary': '#333333',
            'text-secondary': '#666666',
            'text-muted': '#999999',
            'bg-page': '#f5f5f5',
            'bg-panel': '#ffffff',
            'bg-hover': '#eeeeee',
            'border': '#dddddd',
            success: '#22c55e',
            warning: '#f59e0b',
            danger: '#ef4444',
            info: '#3b82f6'
          },
          fontFamily: {
            sans: ['Inter', 'system-ui', 'sans-serif']
          },
          boxShadow: {
            'card': '0 8px 16px rgba(15, 23, 42, .06)',
            'hover': '0 12px 24px rgba(15, 23, 42, .12)',
            'sm': '0 2px 6px rgba(15, 23, 42, .05)',
            'md': '0 6px 12px rgba(15, 23, 42, .08)',
            'lg': '0 10px 20px rgba(15, 23, 42, .10)'
          },
          borderRadius: {
            'sm': '8px',
            'md': '12px',
            'lg': '16px',
            'xl': '20px'
          }
        }
      }
    }
  </script>
  
  <!-- 自定义工具类 -->
  <style type="text/tailwindcss">
    @layer utilities {
      .content-auto {
        content-visibility: auto;
      }
      .menu-item-active {
        @apply bg-primary-weak text-primary border-r-4 border-primary;
      }
      .transition-sidebar {
        @apply transition-all duration-300 ease-in-out;
      }
      .scrollbar-hide::-webkit-scrollbar {
        display: none;
      }
      .scrollbar-hide {
        -ms-overflow-style: none;
        scrollbar-width: none;
      }
    }
  </style>
  
  <style>
    /* 全局样式重置 */
    body {
      margin: 0;
      padding: 0;
      font-family: 'Inter', system-ui, sans-serif;
      background-color: #f5f5f5;
      color: #333333;
    }
    
    /* 侧边栏样式 */
    .sidebar {
      height: 100vh;
      background-color: white;
      box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
      z-index: 900;
    }
    
    .menu-item {
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .menu-item:hover {
      background-color: #f1f5f9;
    }
    
    /* 顶部导航样式 */
    .navbar {
      height: 60px;
      background-color: white;
      box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
      z-index: 1000;
    }
    
    /* 面包屑样式 */
    .breadcrumb-item {
      color: #94a3b8;
    }
    
    .breadcrumb-item.active {
      color: #000000;
    }
    
    /* 卡片样式 */
    .card-hover {
      transition: all 0.3s ease;
    }
    
    .card-hover:hover {
      transform: translateY(-2px);
      box-shadow: 0 12px 24px rgba(15, 23, 42, .12);
    }
    
    /* 表格样式 */
    .table-row:hover {
      background-color: #f1f5f9;
    }
    
    /* 加载动画 */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    .animate-fadeIn {
      animation: fadeIn 0.3s ease-out;
    }
    
    /* 响应式设计 */
    @media (max-width: 768px) {
      .sidebar {
        transform: translateX(-100%);
        position: fixed;
      }
      
      .sidebar.open {
        transform: translateX(0);
      }
      
      .main-content {
        margin-left: 0 !important;
      }
    }
  </style>
</head>
<body class="bg-bg-page">
  <div class="flex h-screen overflow-hidden">
    <!-- 侧边栏 -->
    <aside id="sidebar" class="sidebar w-60 fixed left-0 top-0 bottom-0 transition-sidebar">
      <!-- Logo区域 -->
      <div class="flex items-center justify-center h-16 border-b border-border">
        <div class="text-primary font-bold text-xl flex items-center">
          <i class="fas fa-cube mr-2"></i>
          <span>Kexio</span>
        </div>
      </div>
      
      <!-- 菜单区域 -->
      <nav class="h-[calc(100vh-100px)] overflow-y-auto scrollbar-hide p-4">
        <div class="mb-4 text-xs text-text-muted uppercase font-semibold pl-2">主导航</div>
        
        <!-- 菜单项 -->
        <div class="space-y-1">
          <a href="index.html" class="flex items-center px-4 py-3 rounded-md text-text-secondary menu-item">
            <i class="fas fa-tachometer-alt w-5 text-center mr-3"></i>
            <span>仪表盘</span>
          </a>
          
          <a href="user-management.html" class="flex items-center px-4 py-3 rounded-md menu-item-active">
            <i class="fas fa-users w-5 text-center mr-3"></i>
            <span>用户管理</span>
          </a>
          
          <a href="#" class="flex items-center px-4 py-3 rounded-md text-text-secondary menu-item">
            <i class="fas fa-user-shield w-5 text-center mr-3"></i>
            <span>角色权限</span>
          </a>
          
          <a href="#" class="flex items-center px-4 py-3 rounded-md text-text-secondary menu-item">
            <i class="fas fa-sitemap w-5 text-center mr-3"></i>
            <span>组织架构</span>
          </a>
          
          <a href="#" class="flex items-center px-4 py-3 rounded-md text-text-secondary menu-item">
            <i class="fas fa-file-alt w-5 text-center mr-3"></i>
            <span>文件管理</span>
          </a>
          
          <a href="#" class="flex items-center px-4 py-3 rounded-md text-text-secondary menu-item">
            <i class="fas fa-cog w-5 text-center mr-3"></i>
            <span>系统设置</span>
          </a>
        </div>
        
        <div class="my-6 border-t border-border"></div>
        
        <div class="mb-4 text-xs text-text-muted uppercase font-semibold pl-2">扩展功能</div>
        
        <div class="space-y-1">
          <a href="#" class="flex items-center px-4 py-3 rounded-md text-text-secondary menu-item">
            <i class="fas fa-chart-line w-5 text-center mr-3"></i>
            <span>数据分析</span>
          </a>
          
          <a href="#" class="flex items-center px-4 py-3 rounded-md text-text-secondary menu-item">
            <i class="fas fa-bell w-5 text-center mr-3"></i>
            <span>消息中心</span>
            <span class="ml-auto bg-danger text-white text-xs px-2 py-0.5 rounded-full">3</span>
          </a>
        </div>
      </nav>
      
      <!-- 用户信息区域 -->
      <div class="absolute bottom-0 left-0 right-0 p-4 border-t border-border bg-white">
        <div class="flex items-center">
          <img src="https://picsum.photos/id/1005/40/40" alt="用户头像" class="w-10 h-10 rounded-full object-cover border-2 border-primary-weak">
          <div class="ml-3">
            <div class="text-text-primary font-medium">管理员</div>
            <div class="text-text-muted text-xs">超级管理员</div>
          </div>
          <button class="ml-auto text-text-muted hover:text-text-primary">
            <i class="fas fa-sign-out-alt"></i>
          </button>
        </div>
      </div>
    </aside>
    
    <!-- 主内容区域 -->
    <div id="main-content" class="flex-1 flex flex-col main-content ml-60 transition-sidebar">
      <!-- 顶部导航栏 -->
      <header class="navbar flex items-center justify-between px-6">
        <!-- 左侧按钮区域 -->
        <div class="flex items-center">
          <button id="sidebar-toggle" class="lg:hidden mr-4 text-text-secondary hover:text-primary">
            <i class="fas fa-bars text-xl"></i>
          </button>
          
          <!-- 面包屑导航 -->
          <nav class="hidden md:flex items-center space-x-2 text-sm">
            <a href="index.html" class="breadcrumb-item">首页</a>
            <i class="fas fa-chevron-right text-xs text-text-muted"></i>
            <span class="breadcrumb-item active">用户管理</span>
          </nav>
        </div>
        
        <!-- 右侧操作区域 -->
        <div class="flex items-center space-x-4">
          <!-- 搜索框 -->
          <div class="relative hidden md:block">
            <input type="text" placeholder="搜索..." class="pl-9 pr-4 py-2 rounded-md border border-border bg-bg-hover focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary w-60">
            <i class="fas fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-text-muted"></i>
          </div>
          
          <!-- 消息通知 -->
          <button class="relative p-2 text-text-secondary hover:text-primary hover:bg-bg-hover rounded-full">
            <i class="fas fa-bell text-lg"></i>
            <span class="absolute top-0 right-0 w-2 h-2 bg-danger rounded-full"></span>
          </button>
          
          <!-- 帮助中心 -->
          <button class="p-2 text-text-secondary hover:text-primary hover:bg-bg-hover rounded-full">
            <i class="fas fa-question-circle text-lg"></i>
          </button>
          
          <!-- 主题切换 -->
          <button class="p-2 text-text-secondary hover:text-primary hover:bg-bg-hover rounded-full">
            <i class="fas fa-moon text-lg"></i>
          </button>
        </div>
      </header>
      
      <!-- 内容区域 -->
      <main class="flex-1 overflow-y-auto p-6">
        <!-- 页面标题和操作按钮 -->
        <div class="flex flex-col md:flex-row md:items-center md:justify-between mb-6">
          <div>
            <h1 class="text-2xl font-bold text-text-primary">用户管理</h1>
            <p class="text-text-muted mt-2">管理系统中的所有用户，包括创建、编辑、删除和分配角色</p>
          </div>
          <div class="mt-4 md:mt-0">
            <button id="add-user-btn" class="bg-primary hover:bg-primary-hover text-white px-6 py-2 rounded-md flex items-center shadow-card transition-all">
              <i class="fas fa-plus mr-2"></i>
              <span>新增用户</span>
            </button>
          </div>
        </div>
        
        <!-- 搜索和筛选区域 -->
        <div class="bg-white rounded-lg shadow-card p-6 mb-6">
          <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
            <!-- 用户名/邮箱搜索 -->
            <div>
              <label class="block text-text-secondary mb-2 text-sm font-medium">用户名/邮箱</label>
              <div class="relative">
                <input type="text" placeholder="请输入用户名或邮箱" class="pl-10 pr-4 py-2 w-full rounded-md border border-border bg-bg-hover focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary">
                <i class="fas fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-text-muted"></i>
              </div>
            </div>
            
            <!-- 角色筛选 -->
            <div>
              <label class="block text-text-secondary mb-2 text-sm font-medium">角色</label>
              <div class="relative">
                <select class="pl-4 pr-10 py-2 w-full rounded-md border border-border bg-bg-hover focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary appearance-none">
                  <option value="">全部角色</option>
                  <option value="admin">管理员</option>
                  <option value="department">部门主管</option>
                  <option value="employee">普通员工</option>
                  <option value="guest">访客</option>
                </select>
                <i class="fas fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-text-muted pointer-events-none"></i>
              </div>
            </div>
            
            <!-- 状态筛选 -->
            <div>
              <label class="block text-text-secondary mb-2 text-sm font-medium">状态</label>
              <div class="relative">
                <select class="pl-4 pr-10 py-2 w-full rounded-md border border-border bg-bg-hover focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary appearance-none">
                  <option value="">全部状态</option>
                  <option value="active">启用</option>
                  <option value="disabled">禁用</option>
                </select>
                <i class="fas fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-text-muted pointer-events-none"></i>
              </div>
            </div>
          </div>
          
          <!-- 高级搜索按钮 -->
          <div class="mt-4 flex justify-between items-center">
            <button class="text-primary hover:text-primary-hover text-sm">
              <i class="fas fa-sliders-h mr-1"></i>
              高级搜索
            </button>
            
            <!-- 操作按钮组 -->
            <div class="flex space-x-3">
              <button class="px-4 py-2 border border-border rounded-md text-text-secondary hover:bg-bg-hover">重置</button>
              <button class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary-hover shadow-sm">搜索</button>
            </div>
          </div>
        </div>
        
        <!-- 用户列表表格 -->
        <div class="bg-white rounded-lg shadow-card mb-6 overflow-hidden">
          <!-- 表格头部 -->
          <div class="p-4 border-b border-border bg-bg-hover flex justify-between items-center">
            <div class="text-text-secondary font-medium">用户列表</div>
            <div class="flex items-center space-x-2">
              <button class="text-text-muted hover:text-primary">
                <i class="fas fa-filter"></i>
              </button>
              <button class="text-text-muted hover:text-primary">
                <i class="fas fa-sort"></i>
              </button>
              <button class="text-text-muted hover:text-primary">
                <i class="fas fa-download"></i>
              </button>
              <div class="relative">
                <select class="pl-2 pr-6 py-1 text-sm border border-border rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary appearance-none">
                  <option value="10">10条/页</option>
                  <option value="20">20条/页</option>
                  <option value="50">50条/页</option>
                  <option value="100">100条/页</option>
                </select>
                <i class="fas fa-chevron-down absolute right-2 top-1/2 transform -translate-y-1/2 text-xs text-text-muted pointer-events-none"></i>
              </div>
            </div>
          </div>
          
          <!-- 表格内容 -->
          <div class="overflow-x-auto">
            <table class="w-full">
              <thead>
                <tr class="bg-bg-hover">
                  <th class="py-3 px-4 text-left font-semibold text-text-secondary text-sm w-12">
                    <input type="checkbox" class="rounded border-border text-primary focus:ring-primary">
                  </th>
                  <th class="py-3 px-4 text-left font-semibold text-text-secondary text-sm">用户信息</th>
                  <th class="py-3 px-4 text-left font-semibold text-text-secondary text-sm">角色</th>
                  <th class="py-3 px-4 text-left font-semibold text-text-secondary text-sm">部门</th>
                  <th class="py-3 px-4 text-left font-semibold text-text-secondary text-sm">创建时间</th>
                  <th class="py-3 px-4 text-left font-semibold text-text-secondary text-sm">状态</th>
                  <th class="py-3 px-4 text-left font-semibold text-text-secondary text-sm w-32">操作</th>
                </tr>
              </thead>
              <tbody>
                <!-- 用户1 -->
                <tr class="table-row border-b border-border animate-fadeIn">
                  <td class="py-4 px-4">
                    <input type="checkbox" class="rounded border-border text-primary focus:ring-primary">
                  </td>
                  <td class="py-4 px-4">
                    <div class="flex items-center">
                      <img src="https://picsum.photos/id/1005/48/48" alt="用户头像" class="w-10 h-10 rounded-full mr-3">
                      <div>
                        <div class="font-medium text-text-primary">张三</div>
                        <div class="text-text-muted text-sm">zhangsan@example.com</div>
                      </div>
                    </div>
                  </td>
                  <td class="py-4 px-4 text-text-secondary">管理员</td>
                  <td class="py-4 px-4 text-text-secondary">技术部</td>
                  <td class="py-4 px-4 text-text-muted text-sm">2023-05-15 09:30:25</td>
                  <td class="py-4 px-4">
                    <span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-success/10 text-success">启用</span>
                  </td>
                  <td class="py-4 px-4">
                    <div class="flex space-x-2">
                      <button class="text-primary hover:text-primary-hover text-sm" title="编辑">
                        <i class="fas fa-edit"></i>
                      </button>
                      <button class="text-text-muted hover:text-text-primary text-sm" title="查看详情">
                        <i class="fas fa-eye"></i>
                      </button>
                      <button class="text-danger hover:text-danger/80 text-sm" title="删除">
                        <i class="fas fa-trash"></i>
                      </button>
                    </div>
                  </td>
                </tr>
                
                <!-- 用户2 -->
                <tr class="table-row border-b border-border animate-fadeIn" style="animation-delay: 0.1s">
                  <td class="py-4 px-4">
                    <input type="checkbox" class="rounded border-border text-primary focus:ring-primary">
                  </td>
                  <td class="py-4 px-4">
                    <div class="flex items-center">
                      <img src="https://picsum.photos/id/1012/48/48" alt="用户头像" class="w-10 h-10 rounded-full mr-3">
                      <div>
                        <div class="font-medium text-text-primary">李四</div>
                        <div class="text-text-muted text-sm">lisi@example.com</div>
                      </div>
                    </div>
                  </td>
                  <td class="py-4 px-4 text-text-secondary">部门主管</td>
                  <td class="py-4 px-4 text-text-secondary">市场部</td>
                  <td class="py-4 px-4 text-text-muted text-sm">2023-05-20 14:15:42</td>
                  <td class="py-4 px-4">
                    <span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-success/10 text-success">启用</span>
                  </td>
                  <td class="py-4 px-4">
                    <div class="flex space-x-2">
                      <button class="text-primary hover:text-primary-hover text-sm" title="编辑">
                        <i class="fas fa-edit"></i>
                      </button>
                      <button class="text-text-muted hover:text-text-primary text-sm" title="查看详情">
                        <i class="fas fa-eye"></i>
                      </button>
                      <button class="text-danger hover:text-danger/80 text-sm" title="删除">
                        <i class="fas fa-trash"></i>
                      </button>
                    </div>
                  </td>
                </tr>
                
                <!-- 用户3 -->
                <tr class="table-row border-b border-border animate-fadeIn" style="animation-delay: 0.2s">
                  <td class="py-4 px-4">
                    <input type="checkbox" class="rounded border-border text-primary focus:ring-primary">
                  </td>
                  <td class="py-4 px-4">
                    <div class="flex items-center">
                      <img src="https://picsum.photos/id/1025/48/48" alt="用户头像" class="w-10 h-10 rounded-full mr-3">
                      <div>
                        <div class="font-medium text-text-primary">王五</div>
                        <div class="text-text-muted text-sm">wangwu@example.com</div>
                      </div>
                    </div>
                  </td>
                  <td class="py-4 px-4 text-text-secondary">普通员工</td>
                  <td class="py-4 px-4 text-text-secondary">财务部</td>
                  <td class="py-4 px-4 text-text-muted text-sm">2023-05-25 10:08:37</td>
                  <td class="py-4 px-4">
                    <span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-success/10 text-success">启用</span>
                  </td>
                  <td class="py-4 px-4">
                    <div class="flex space-x-2">
                      <button class="text-primary hover:text-primary-hover text-sm" title="编辑">
                        <i class="fas fa-edit"></i>
                      </button>
                      <button class="text-text-muted hover:text-text-primary text-sm" title="查看详情">
                        <i class="fas fa-eye"></i>
                      </button>
                      <button class="text-danger hover:text-danger/80 text-sm" title="删除">
                        <i class="fas fa-trash"></i>
                      </button>
                    </div>
                  </td>
                </tr>
                
                <!-- 用户4 -->
                <tr class="table-row border-b border-border animate-fadeIn" style="animation-delay: 0.3s">
                  <td class="py-4 px-4">
                    <input type="checkbox" class="rounded border-border text-primary focus:ring-primary">
                  </td>
                  <td class="py-4 px-4">
                    <div class="flex items-center">
                      <img src="https://picsum.photos/id/1027/48/48" alt="用户头像" class="w-10 h-10 rounded-full mr-3">
                      <div>
                        <div class="font-medium text-text-primary">赵六</div>
                        <div class="text-text-muted text-sm">zhaoliu@example.com</div>
                      </div>
                    </div>
                  </td>
                  <td class="py-4 px-4 text-text-secondary">普通员工</td>
                  <td class="py-4 px-4 text-text-secondary">技术部</td>
                  <td class="py-4 px-4 text-text-muted text-sm">2023-06-01 16:55:18</td>
                  <td class="py-4 px-4">
                    <span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-success/10 text-success">启用</span>
                  </td>
                  <td class="py-4 px-4">
                    <div class="flex space-x-2">
                      <button class="text-primary hover:text-primary-hover text-sm" title="编辑">
                        <i class="fas fa-edit"></i>
                      </button>
                      <button class="text-text-muted hover:text-text-primary text-sm" title="查看详情">
                        <i class="fas fa-eye"></i>
                      </button>
                      <button class="text-danger hover:text-danger/80 text-sm" title="删除">
                        <i class="fas fa-trash"></i>
                      </button>
                    </div>
                  </td>
                </tr>
                
                <!-- 用户5 -->
                <tr class="table-row border-b border-border animate-fadeIn" style="animation-delay: 0.4s">
                  <td class="py-4 px-4">
                    <input type="checkbox" class="rounded border-border text-primary focus:ring-primary">
                  </td>
                  <td class="py-4 px-4">
                    <div class="flex items-center">
                      <img src="https://picsum.photos/id/1074/48/48" alt="用户头像" class="w-10 h-10 rounded-full mr-3">
                      <div>
                        <div class="font-medium text-text-primary">钱七</div>
                        <div class="text-text-muted text-sm">qianqi@example.com</div>
                      </div>
                    </div>
                  </td>
                  <td class="py-4 px-4 text-text-secondary">访客</td>
                  <td class="py-4 px-4 text-text-secondary">暂无</td>
                  <td class="py-4 px-4 text-text-muted text-sm">2023-06-05 11:42:01</td>
                  <td class="py-4 px-4">
                    <span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-warning/10 text-warning">禁用</span>
                  </td>
                  <td class="py-4 px-4">
                    <div class="flex space-x-2">
                      <button class="text-primary hover:text-primary-hover text-sm" title="编辑">
                        <i class="fas fa-edit"></i>
                      </button>
                      <button class="text-text-muted hover:text-text-primary text-sm" title="查看详情">
                        <i class="fas fa-eye"></i>
                      </button>
                      <button class="text-danger hover:text-danger/80 text-sm" title="删除">
                        <i class="fas fa-trash"></i>
                      </button>
                    </div>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
          
          <!-- 分页 -->
          <div class="p-4 border-t border-border flex flex-col md:flex-row md:justify-between md:items-center">
            <div class="text-text-secondary text-sm mb-4 md:mb-0">
              共 <span class="text-primary font-medium">125</span> 条数据，当前显示第 <span class="text-primary font-medium">1-5</span> 条
            </div>
            <div class="flex items-center space-x-2">
              <button class="w-8 h-8 flex items-center justify-center rounded border border-border text-text-secondary hover:bg-bg-hover disabled:opacity-50 disabled:cursor-not-allowed" disabled>
                <i class="fas fa-angle-left"></i>
              </button>
              <button class="w-8 h-8 flex items-center justify-center rounded bg-primary text-white">1</button>
              <button class="w-8 h-8 flex items-center justify-center rounded border border-border text-text-secondary hover:bg-bg-hover">2</button>
              <button class="w-8 h-8 flex items-center justify-center rounded border border-border text-text-secondary hover:bg-bg-hover">3</button>
              <button class="w-8 h-8 flex items-center justify-center rounded border border-border text-text-secondary hover:bg-bg-hover">4</button>
              <button class="w-8 h-8 flex items-center justify-center rounded border border-border text-text-secondary hover:bg-bg-hover">5</button>
              <button class="w-8 h-8 flex items-center justify-center rounded border border-border text-text-secondary hover:bg-bg-hover">
                <i class="fas fa-angle-right"></i>
              </button>
            </div>
          </div>
        </div>
      </main>
    </div>
  </div>
  
  <!-- 新增用户弹窗 -->
  <div id="add-user-modal" class="fixed inset-0 bg-black/50 flex items-center justify-center z-50 hidden">
    <div class="bg-white rounded-lg shadow-lg w-full max-w-2xl max-h-[90vh] overflow-hidden flex flex-col animate-fadeIn">
      <!-- 弹窗头部 -->
      <div class="p-6 border-b border-border flex justify-between items-center">
        <h3 class="text-lg font-semibold text-text-primary">新增用户</h3>
        <button id="close-modal-btn" class="text-text-muted hover:text-text-primary">
          <i class="fas fa-times"></i>
        </button>
      </div>
      
      <!-- 弹窗内容 -->
      <div class="p-6 overflow-y-auto flex-1">
        <form id="add-user-form">
          <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
            <!-- 用户名 -->
            <div>
              <label class="block text-text-secondary mb-2 text-sm font-medium">用户名 <span class="text-danger">*</span></label>
              <input type="text" class="w-full px-4 py-2 rounded-md border border-border focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" placeholder="请输入用户名">
            </div>
            
            <!-- 邮箱 -->
            <div>
              <label class="block text-text-secondary mb-2 text-sm font-medium">邮箱 <span class="text-danger">*</span></label>
              <input type="email" class="w-full px-4 py-2 rounded-md border border-border focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" placeholder="请输入邮箱">
            </div>
            
            <!-- 姓名 -->
            <div>
              <label class="block text-text-secondary mb-2 text-sm font-medium">姓名 <span class="text-danger">*</span></label>
              <input type="text" class="w-full px-4 py-2 rounded-md border border-border focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" placeholder="请输入姓名">
            </div>
            
            <!-- 手机号 -->
            <div>
              <label class="block text-text-secondary mb-2 text-sm font-medium">手机号</label>
              <input type="tel" class="w-full px-4 py-2 rounded-md border border-border focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" placeholder="请输入手机号">
            </div>
            
            <!-- 角色 -->
            <div>
              <label class="block text-text-secondary mb-2 text-sm font-medium">角色 <span class="text-danger">*</span></label>
              <select class="w-full px-4 py-2 rounded-md border border-border focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary">
                <option value="">请选择角色</option>
                <option value="admin">管理员</option>
                <option value="department">部门主管</option>
                <option value="employee">普通员工</option>
                <option value="guest">访客</option>
              </select>
            </div>
            
            <!-- 部门 -->
            <div>
              <label class="block text-text-secondary mb-2 text-sm font-medium">部门 <span class="text-danger">*</span></label>
              <select class="w-full px-4 py-2 rounded-md border border-border focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary">
                <option value="">请选择部门</option>
                <option value="tech">技术部</option>
                <option value="marketing">市场部</option>
                <option value="finance">财务部</option>
                <option value="hr">人力资源部</option>
                <option value="sales">销售部</option>
              </select>
            </div>
            
            <!-- 职位 -->
            <div>
              <label class="block text-text-secondary mb-2 text-sm font-medium">职位</label>
              <input type="text" class="w-full px-4 py-2 rounded-md border border-border focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" placeholder="请输入职位">
            </div>
            
            <!-- 状态 -->
            <div>
              <label class="block text-text-secondary mb-2 text-sm font-medium">状态 <span class="text-danger">*</span></label>
              <div class="flex items-center space-x-4">
                <label class="inline-flex items-center">
                  <input type="radio" name="status" value="active" class="text-primary focus:ring-primary" checked>
                  <span class="ml-2 text-text-secondary">启用</span>
                </label>
                <label class="inline-flex items-center">
                  <input type="radio" name="status" value="disabled" class="text-primary focus:ring-primary">
                  <span class="ml-2 text-text-secondary">禁用</span>
                </label>
              </div>
            </div>
            
            <!-- 密码 -->
            <div>
              <label class="block text-text-secondary mb-2 text-sm font-medium">密码 <span class="text-danger">*</span></label>
              <input type="password" class="w-full px-4 py-2 rounded-md border border-border focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" placeholder="请设置密码">
            </div>
            
            <!-- 确认密码 -->
            <div>
              <label class="block text-text-secondary mb-2 text-sm font-medium">确认密码 <span class="text-danger">*</span></label>
              <input type="password" class="w-full px-4 py-2 rounded-md border border-border focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" placeholder="请再次输入密码">
            </div>
          </div>
          
          <!-- 备注 -->
          <div class="mt-6">
            <label class="block text-text-secondary mb-2 text-sm font-medium">备注</label>
            <textarea class="w-full px-4 py-2 rounded-md border border-border focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" rows="3" placeholder="请输入备注信息"></textarea>
          </div>
        </form>
      </div>
      
      <!-- 弹窗底部 -->
      <div class="p-6 border-t border-border flex justify-end space-x-4">
        <button id="cancel-btn" class="px-6 py-2 border border-border rounded-md text-text-secondary hover:bg-bg-hover">取消</button>
        <button id="submit-btn" class="px-6 py-2 bg-primary text-white rounded-md hover:bg-primary-hover shadow-sm">确定</button>
      </div>
    </div>
  </div>
  
  <!-- 页面交互脚本 -->
  <script>
    // 侧边栏切换
    document.getElementById('sidebar-toggle').addEventListener('click', function() {
      const sidebar = document.getElementById('sidebar');
      sidebar.classList.toggle('open');
    });
    
    // 新增用户弹窗
    const addUserModal = document.getElementById('add-user-modal');
    
    // 打开弹窗
    document.getElementById('add-user-btn').addEventListener('click', function() {
      addUserModal.classList.remove('hidden');
      // 防止背景滚动
      document.body.style.overflow = 'hidden';
    });
    
    // 关闭弹窗
    function closeModal() {
      addUserModal.classList.add('hidden');
      // 恢复背景滚动
      document.body.style.overflow = '';
    }
    
    document.getElementById('close-modal-btn').addEventListener('click', closeModal);
    document.getElementById('cancel-btn').addEventListener('click', closeModal);
    
    // 点击弹窗外部关闭
    addUserModal.addEventListener('click', function(e) {
      if (e.target === addUserModal) {
        closeModal();
      }
    });
    
    // 提交表单
    document.getElementById('submit-btn').addEventListener('click', function() {
      // 这里可以添加表单验证和提交逻辑
      alert('用户创建成功！');
      closeModal();
    });
    
    // 表格全选功能
    const headerCheckbox = document.querySelector('thead input[type="checkbox"]');
    const rowCheckboxes = document.querySelectorAll('tbody input[type="checkbox"]');
    
    if (headerCheckbox && rowCheckboxes.length > 0) {
      headerCheckbox.addEventListener('change', function() {
        rowCheckboxes.forEach(checkbox => {
          checkbox.checked = headerCheckbox.checked;
        });
      });
    }
  </script>
</body>
</html>